﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DreamBuilder.Common;
using ePlanet.SingleWell.Services;
using ePlanet.SingleWell.DataAccess;
using System.Data;
using ePlanet.SingleWell.Models;

namespace ePlanet.SingleWell.Business
{
    public class BUSWellCatalog : BusinessBase, IWellCatalogService
    {
        private WellCatalogDAL m_WellCatalogDAL = null;

        public BUSWellCatalog()
        {
            if (this.m_WellCatalogDAL == null)
            {
                this.m_WellCatalogDAL = new WellCatalogDAL();
            }
        }

        public void AddNewWellCataLog(Models.WellCatalog catalog)
        {
            this.m_WellCatalogDAL.AddNewCatalog(catalog);
        }

        public void DeleteWellCatalog(string catalogID)
        {
            this.m_WellCatalogDAL.DeleteWellCatalog(catalogID);
        }

        public void UpdateWellCatalog(Models.WellCatalog catalog)
        {
            this.m_WellCatalogDAL.UpdateWellCatalog(catalog);
        }

        public WellCatalog.WELLCATALOGDataTable GetAllWellCatalog()
        {
            return this.m_WellCatalogDAL.GetAllWellCatalog();
        }

        public Models.WellCatalog GetWellCatalogByID(string catalogID)
        {
            return this.m_WellCatalogDAL.GetWellCatalogByID(catalogID);
        }

        public WellCatalog GetWellCatalogByParentID(string parentID)
        {
            return m_WellCatalogDAL.GetWellCatalogByParentID(parentID);
        }


        public WellCatalog GetWellCataLogByParam(string param)
        {
            return m_WellCatalogDAL.GetWellCataLogByParam(param);
        }

        public WellCatalog GetBaseCatalog()
        {
            return this.m_WellCatalogDAL.GetBaseCatalog();
        }
    }
}
